drm/nouveau/tmr: fully separate alarm execution/pending lists
authorBen Skeggs <bskeggs@redhat.com>
Mon, 5 Jun 2017 07:23:32 +0000 (17:23 +1000)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:56:36 +0000 (02:56 +0000)
commit57115ff550b9765f6d2988e94a3b314e80118b23
treebd55e64a443be8a9b38d9199eb8f12483a4c05ed
parent98e18d9ff0443ecf321dd8b2109ec3376d2bce35
drm/nouveau/tmr: fully separate alarm execution/pending lists

commit b4e382ca7586a63b6c1e5221ce0863ff867c2df6 upstream.

Reusing the list_head for both is a bad idea.  Callback execution is done
with the lock dropped so that alarms can be rescheduled from the callback,
which means that with some unfortunate timing, lists can get corrupted.

The execution list should not require its own locking, the single function
that uses it can only be called from a single context.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/include/nvkm/subdev/timer.h
drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c